



Integer.metaClass {
    daysFromNow = {
        ->
        Calendar today = Calendar.instance
        today.add(Calendar.DAY_OF_MONTH, delegate)
        today.time
    }

    getDaysFromNow = {
        ->
        Calendar today = Calendar.instance
        today.add(Calendar.DAY_OF_MONTH, delegate)
        today.time
    }
    'static'{
        isEven = {val -> val % 2 == 0}
    }
    constructor = {
        int val ->
            println "Intercepting constructor call"
            constructor = Integer.class.getConstructor(Integer.TYPE)
            constructor.newInstance(val)
    }
}

